<!DOCTYPE html>
<html style="height: 100%">
<head>
    <meta charset="utf-8"><link rel="icon" href="img/icon.jpg">
</head>
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/base-min.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<body style="height: 100%; margin: 0">
<header class="head">
    <h3 class="head_button" ><a href="/">首页</a></h3>
    <h3 class="head_button"><a style="background-color: gray" href="/pie">饼状图</a></h3>
    <h3 class="head_button"><a href="/pre">预测页面</a></h3>
    <h3 class="head_button"><a href="/hurt">小麦病虫害</a></h3>
    <h3 class="head_button" ><a  href="/mostLike">最受欢迎农产品价格比较</a></h3>
    <h3 class="head_button" ><a href="/earth">百度地图</a></h3>
    <h3 class="head_button" ><a href="/line">农业总产值预测-折线图</a></h3>
</header>
<section class="section">
    <div id="container" style="height: 100%"></div>
</section>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<script type="text/javascript">
    var dom = document.getElementById("container");
    var myChart = echarts.init(dom);
    var app = {};
    var option;
    option = {
        title: {
            text: '南丁格尔玫瑰图',
            subtext: '纯属虚构',
            left: 'center'
        },
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        legend: {
            left: 'center',
            top: 'bottom',
            data: ['rose1', 'rose2', 'rose3', 'rose4', 'rose5', 'rose6', 'rose7', 'rose8']
        },
        toolbox: {
            show: true,
            feature: {
                mark: {show: true},
                dataView: {show: true, readOnly: false},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        series: [
            {
                name: '面积模式',
                type: 'pie',
                radius: [20, 140],
                center: ['50%', '50%'],
                roseType: 'area',
                itemStyle: {
                    borderRadius: 5
                },
                data: [
                    {value: 30, name: 'rose 1'},
                    {value: 28, name: 'rose 2'},
                    {value: 26, name: 'rose 3'},
                    {value: 24, name: 'rose 4'},
                    {value: 22, name: 'rose 5'},
                    {value: 20, name: 'rose 6'},
                    {value: 18, name: 'rose 7'},
                    {value: 16, name: 'rose 8'}
                ]
            }
        ]
    };

    if (option && typeof option === 'object') {
        myChart.setOption(option);
    }

</script>
</body>
</html>
